package castle.defense.project;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
/**
 * Basic "target" class.
 * 
 * Needs Update to how it is drawn (to look like a real target).
 * Needs a shatter noise when destroyed.
 * 
 * @author Daniel Wasserman
 *
 */
public class Target extends Enemy {
	public static Target makeTarget(double x, double y) {
		return new Target(x,y,standardSize);
	}
	
	public static final float standardSize = 15;
	private Paint paint;
	public Target(double x, double y, float s) {
		super(x,y,s,20,30);
		paint = new Paint();
		paint.setStyle(Style.FILL_AND_STROKE);
	}
	
	@Override
	public void draw(Canvas c) {
		paint.setColor(Color.RED);
		GraphicsEngine.drawOval(c, p, size, paint);
		paint.setColor(Color.WHITE);
		GraphicsEngine.drawOval(c, p, size*.7, paint);
		paint.setColor(Color.RED);
		GraphicsEngine.drawOval(c, p, size*.5, paint);
		GraphicsEngine.drawHealthBar(c, getX()-size(), getY()+size()+10, getX()+size, getY()+size, healthPoints, baseHealth);
	}

	@Override
	public Projectile updateE(long milli) {
		return null;
	}

	@Override
	public int height() {
		// TODO Auto-generated method stub
		return 10;
	}
	
	@Override
	public void makeDeathSound() {
		SoundManager.playSound(SoundManager.shatter);
	}
}
